﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GSLMS.Entity;
using System.ServiceModel;
using GSLMS.Entity.DTO;

namespace GSLMS.Services.Interface
{
    [ServiceContract(Name = "Dictionary", Namespace = "http://www.haigu.com/")]
    public interface IDictionary
    {
        [OperationContract]
        List<Dictionary> GetAll(int langType = 0);
        [OperationContract]
        List<Dictionary> GetAll(Dictionary searchParm);
        List<Dictionary> GetByGroupName(string groupName, int langType = 0);
        [OperationContract]
        Dictionary GetByID(string key, int langType = 0);
        [OperationContract]
        Dictionary GetByID(string groupname, string key, int langType = 0);
        /// <summary>
        /// 新增数据字典，1成功，0失败，-1编号已经存在，-2名称已经存在
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [OperationContract]
        int Add(Dictionary model);
        /// <summary>
        /// 编辑数据字典，1成功，0失败，-1编号已经存在，-2名称已经存在
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [OperationContract]
        int Update(Dictionary model);
        [OperationContract]
        bool Delete(string key, string groupname);
        [OperationContract]
        bool DeleteGroupName(string groupName);
        [OperationContract]
        bool IsExits(string groupName,string key);

    }
}
